<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  
  String historyUrl = (String)request.getAttribute("historyUrl");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>页面加载中...</title>
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
  <meta content="yes" name="apple-mobile-web-app-capable"/>
  <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
  <meta content="telephone=no" name="format-detection"/>
  <script type="text/javascript" src="<%=basePath %>js/jquery-1.8.3.min.js"></script>
  <style type="text/css">
    .loading-layer-box,.loading-layer-box *{ margin:0; padding:0; -moz-box-sizing:border-box; -o-box-sizing:border-box; box-sizing:border-box;}
    .loading-layer-box{ position:fixed; width:200px; height:200px; overflow:hidden; border:5px solid #fafafa; border-radius:50%; background:#fff; left:50%; top:50%; margin-left:-100px; margin-top:-100px;}
    .loading-layer-box p{ text-align:center; line-height:200px; font-size:14px; color:#666;}
    .loading-layer-box .load-box{ border:5px solid #e6e6e6; border-radius:50%; position:absolute; left:8px; top:8px; right:8px; bottom:8px; border-left-color:#60dfdf; -webkit-animation:myFrames 1s infinite linear;}
    @-webkit-keyframes myFrames {
      0% {
        -webkit-transform: rotate(0deg);
      }
      100% {
        -webkit-transform: rotate(360deg);
      }
    }
  </style>
  	<% if(historyUrl!= null && "-1".equals(historyUrl)){%>
  		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	  	<script type="text/javascript">
			  	wx.config({
			  	    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
			  	    appId: '${signmap.appId}', // 必填，公众号的唯一标识
			  	    timestamp: ${signmap.timestamp}, // 必填，生成签名的时间戳
			  	    nonceStr: '${signmap.nonceStr}', // 必填，生成签名的随机串
			  	    signature: '${signmap.signature}',// 必填，签名，见附录1
			  	    jsApiList: [] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
			  	  });
				wx.ready(function(){
					WeixinJSBridge.call('closeWindow');
				});
		</script>
	<% }else{%>
		<script type="text/javascript">
			$(function(){
				location.href = "${historyUrl}";
			});
		</script>
	<% }%>
</head>

<body>
<div class="loading-layer-box">
  <div class="load-box"></div>
  <p>努力加载中...</p>
</div>
</body>
</html>